package com.ruoyi.common.config;

import com.ruoyi.common.utils.FtpUtils;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author liuzhiqiang
 */
@Component
@ConfigurationProperties(prefix = "sftp")
public class FtpConfig {

    private String host;
    private Integer port;
    private String rootDirectory;
    private String putDirectory;
    private String getDirectory;
    private String username;
    private String password;
    private String savePassword;
    private String readPassword;

    @PostConstruct
    public void init() {
        FtpUtils.ftpConfig = this;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public String getRootDirectory() {
        return rootDirectory;
    }

    public void setRootDirectory(String rootDirectory) {
        this.rootDirectory = rootDirectory;
    }

    public String getPutDirectory() {
        return putDirectory;
    }

    public void setPutDirectory(String putDirectory) {
        this.putDirectory = putDirectory;
    }

    public String getGetDirectory() {
        return getDirectory;
    }

    public void setGetDirectory(String getDirectory) {
        this.getDirectory = getDirectory;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSavePassword() {
        return savePassword;
    }

    public void setSavePassword(String savePassword) {
        this.savePassword = savePassword;
    }

    public String getReadPassword() {
        return readPassword;
    }

    public void setReadPassword(String readPassword) {
        this.readPassword = readPassword;
    }
}
